<%- include('header', { tabCls: 'trending' }); %>
<ul class="list repos trending">
    <li class="rank-title">
      <a href="https://github.com/trending" target="_blank">Repositories Trending</a>
      <span class="select">
        <a class="<%= type === 'daily' ? 'active': '' %>" href="trending.html">Today</a>
        <a class="<%= type === 'weekly' ? 'active': '' %>" href="trending-weekly.html">Week</a>
        <a class="<%= type === 'monthly' ? 'active': '' %>" href="trending-monthly.html">Month</a>
      </span>
    </li>
    <% trending.forEach(function(repo, idx){ %>
    <li>
      <div class="info">
        <div class="rank">
          <span title="Ranking <%=idx + 1%>"><%=idx + 1%></span>
          <a href="<%=repo.html_url%>" target="_blank" title="<%=repo.full_name%>"><%=repo.full_name%></a>
        </div>
        <div class="sub-title followers">
          <% if(repo.language) {%>
          <a class="language" target="_blank" href="https://github.com/topics/<%=repo.language.toLowerCase()%>"  title="Programming Language <%=repo.language%>">
            <span style="background-color: <%=repo.color%>;"></span><%=repo.language%>
          </a>
          <% } %>
          <span class="star" title="Stargazers Count">
            <svg aria-label="star" viewBox="0 0 14 16" version="1.1" width="14" height="16" role="img">
              <path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74L14 6z"></path>
            </svg>
            <span><%=repo.stargazers_count%></span>
          </span>
          <span class="star">
            <svg aria-label="star" viewBox="0 0 14 16" version="1.1" width="14" height="16" role="img">
              <path fill-rule="evenodd" d="M14 6l-4.9-.64L7 1 4.9 5.36 0 6l3.6 3.26L2.67 14 7 11.67 11.33 14l-.93-4.74L14 6z"></path>
            </svg>
            <span><%=repo.todayStar%></span>
          </span>
        </div>
        <div class="details">
          <%=repo.description%>
        </div>
      </div>
    </li>
    <% }); %>
</ul>
<%- include('footer', { }); %>